<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8"/>
	<meta name="keywords" content="comment, comment-out, uncomment"/>
	<link rel="stylesheet" href="../../Shared/sty/standard.css"/>
	<script defer src="../../Shared/js/toc.js"></script>
	
	<title>Define comment delimiters in CotEditor on Mac</title>
</head>

<body>
<a name="syntax_comment_settings"></a>

<h1>Define comment delimiters in CotEditor on Mac</h1>

<p>To define the comment delimiters for a syntax, select Comment from the list on the left of the syntax editor, then enter delimiters to the text fields on the right side. See <a href="syntax_definition.html">Define a syntax</a> for how to open the syntax editor.</p>


<section>
<p>The settings for comments that are used for both comment-out/uncomment and syntax highlighting are as follows:</p>

<table>
	<thead>
		<tr><th>Field</th><th>Description</th></tr>
	</thead>
	<tbody>
		<tr><th>inline comment</th><td>The text starting with this delimiter until the end of the line is handled as a inline comment.</td></tr>
		<tr><th>block comment</th><td>The text surrounded with these start and end delimiters is handled as a block comment. You need to fill both ”begin with” and ”end with.”</td></tr>
	</tbody>
</table>

<p>By the normal Comment Out command, the inline comment is preferred when both inline and block command delimiters are defined. When inline comment field is empty, the block comment is used in favor.</p>

<p>The highlighting rules for the comment keywords in the table below works the same as the <a href="syntax_highlight_settings.html">Define syntax highlighting</a>. Unlike the settings for comment delimiters, these rules are used only for highlighting.</p>
</section>


<section id="cf">
<h2>See also</h2>
<ul>
	<li><a href="syntax_definition.html">Define a syntax</a></li>
	<li><a href="syntax_highlight_settings.html">Define syntax highlighting</a></li>
	<li><a href="about_regex.html">Use the regular expression</a></li>
</ul>
</section>

</body>
</html>
